package com.zhuangjie.coupon.feign;

import com.zhaungjie.base.conduit.TypeR;
import com.zhuangjie.shop.vo.ShopDisplayInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Component
@FeignClient(name = "spark-shop",path = "/shop")
public interface ShopFeignService {
    @GetMapping("/dish-category/category-name")
    @ApiOperation("根据分类id查询分类名称")
    TypeR<Map<Long, String>> queryCategoryNames(@RequestParam("dishCategoryIds") String dishCategoryIds);

    @GetMapping("/dish/dish-name")
    @ApiOperation("根据菜品id查询菜品名称")
    TypeR<Map<Long, String>> queryDishNames(@RequestParam("dishIds") String dishIds);

    @GetMapping("/shop/query-shop-display-info")
    @ApiOperation("根据店铺ids查询店铺信息列表")
    TypeR<List<ShopDisplayInfo>> queryShopsDisplayInfo(@RequestParam("shopIds") List<Long> shopIds);

    @ApiOperation("店铺是否支持神券活动")
    @GetMapping("/shop-activity-instance/is-super-divine-voucher/{shopId}")
    TypeR<Boolean> isShopInvolvedInPlatformCouponActivity(@PathVariable("shopId") Long shopId);

}
